home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
biz
/
dopus
/
parent.lha
/
Parent
/
Install
next >
Wrap
Text File
|
2002-10-17
|
4KB
|
189 lines
; Install script for Various DOpus5 modules
; $VER: Module_Install 1.0 (17.10.2002) ©2002 Robin Cloutman <rycochet@rycochet.demon.co.uk>
(set @default-dest "DOpus5:")
;---------------------------------------------------------------------------
;(if (= @language "english)
;(
(set #setup-text "Checking system and application...")
(set #msg-abort
(cat "ERROR - Cannot find required files for installation!!!\n\n"
"Please ensure you extracted the archive\n"
"correctly!"
))
(set #msg-cpu
(cat "Which version of " @app-name " do you wish to install?"
))
(set #msg-cpu-help
(cat "Unless you have some reason to choose a different version, best leave\n"
"this to the default version.\n\n"
"(The 68000 version is safe for all cpu's)"
))
(set #msg-dest
(cat "Where is DOpus5 Installed?\n"
"(" @app-name " is installed relative to this)"
))
(set #msg-dest-help
(cat "This should be where DOpus5 itself lives, as there may be may parts for this module.\n\n"
@askdir-help
))
(set #msg-module
(cat "Installing " @app-name ".module"
))
(set #msg-module-help
(cat "Just installing the module...\n\n"
@copylib-help
))
(set #msg-readme
(cat "Installing " @app-name ".readme"
))
(set #msg-readme-help
(cat "Just installing the readme...\n\n"
@copyfiles-help
))
(set #msg-rexx
(cat "Installing various ARexx files"
))
(set #msg-rexx-help
(cat "These files are either required, or examples.\n\n"
@copyfiles-help
))
(set #msg-exit
(cat "Installation complete\n\n"
@app-name " has been installed in " @default-dest
))
;)
;=============================================================================
(procedure p_file arg1 arg2 arg3
(if (= (exists arg1) true)
(if (>= arg2 arg3)
(
(set #file arg1)
true
)
false
)
false
)
)
;=============================================================================
(welcome)
(complete 0)
(working #setup-text)
(if (= (exists (cat "Modules/" @app-name ".module")) false)
(if (= (exists (cat "Modules/" @app-name ".module_020")) false)
(if (= (exists (cat "Modules/" @app-name ".module_040")) false)
(if (= (exists (cat "Modules/" @app-name ".module_060")) false)
(abort #msg-abort)
)
)
)
)
(if (= (database "cpu") "68060")(set #version 4)
(if (= (database "cpu") "68040")(set #version 3)
(if (= (database "cpu") "68030")(set #version 2)
(if (= (database "cpu") "68020")(set #version 1)
(set #version 0)
)
)
)
)
(complete 25)
(if (>= @user-level 1)
(set @default-dest
(askdir
(prompt #msg-dest)
(help #msg-dest-help)
(default @default-dest)
)
)
)
(complete 50)
(if (>= @user-level 1)
(set #version
(askchoice
(prompt #msg-cpu)
(help #msg-cpu-help)
(choices "68000" "68020" "68030" "68040" "68060")
(default #version)
)
)
)
(if (= (p_file (cat "Modules/" @app-name ".module_060") #version 4) false)
(if (= (p_file (cat "Modules/" @app-name ".module_040") #version 3) false)
(if (= (p_file (cat "Modules/" @app-name ".module_020") #version 1) false)
(if (= (set #file (cat "Modules/" @app-name ".module")) false)
(abort #msg-abort)
)
)
)
)
(set #module-dir (tackon @default-dest "Modules"))
(set #rexx-dir (tackon @default-dest "Rexx"))
(complete 75)
(copylib
(prompt #msg-module)
(help #msg-module-help)
(source #file)
(dest #module-dir)
(newname (cat @app-name ".module"))
(if (>= @user-level 2)(confirm))
(optional force)
(nogauge)
)
(if (= (exists (cat @app-name ".readme")) true)
(copyfiles
(prompt #msg-readme)
(help #msg-readme-help)
(source (cat @app-name ".readme"))
(dest @default-dest)
(if (>= @user-level 2)(confirm))
(optional nofail force)
(nogauge)
)
)
(if (<> (exists "Rexx") false)
(foreach "Rexx/" "#?"
(copylib
(prompt #msg-rexx)
(help #msg-rexx-help)
(source (tackon "Rexx" @each-name))
(dest #rexx-dir)
(if (>= @user-level 2)(confirm))
(optional nofail force)
(nogauge)
)
)
)
(complete 100)
(exit #msg-exit (quiet))